<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<%@ include file="/common/common.jsp" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
	<head>
	<script type="text/javascript" src="../js/md5.js"></script>
	<script language="javascript" src="../js/DatePicker/WdatePicker.js" type="text/javascript"></script>
	<script type="text/javascript" language="javascript">
		function getPwd() {
 			var pwd = document.getElementById("pwd");
 			if(pwd.value == ''){
 				alert("密码不能为空！");
 				return false;
 			}
 			pwd.value = hex_md5(pwd.value);
 			return true;
		}
	</script>
	</head>
	<body bgcolor="#ccddee" link="#000066" vlink="#0066FF" alink="#99FF00">
		<div>
			<table>
				<tr>
					<td>
						<s:fielderror cssStyle="color:red" />
					</td>
				</tr>
			</table>
		</div>
		<center>
			<s:form method="post" namespace="/test" theme="simple" action="testAddPersonnel"  enctype="multipart/form-data"
				 onsubmit="return getPwd();">
				<table width="100%" border=1 align="center" cellpadding="0"
					cellspacing="0" bgcolor="#ccddee">
					<tr>
						<td width="15%" align="right">
							上传照片:
						</td>
						<td width="30%">
							<s:file name="file"  theme="simple" ></s:file>
						</td>
						<td align="left">
							
						</td>
					</tr>
					<tr>
						<td width="15%" align="right">
							所在部门:
						</td>
						<td width="30%">
							<s:select name="department.deptcode" list="deptlist" 
									listKey="deptcode" 
									listValue="deptcaption"
									headerKey="0" headerValue="请选择部门"
									theme="simple"></s:select>
						</td>
						<td align="left">
							
						</td>
					</tr>
					<tr>
						<td width="15%" align="right">
							登录账号:
						</td>
						<td width="30%">
							<s:textfield name="personnel.loginname" theme="simple" required="true"></s:textfield>
						</td>
						<td align="left">
							
						</td>
					</tr>
					<tr>
						<td width="15%" align="right">
							登录密码:
						</td>
						<td width="30%">
							<s:password  id="pwd" name="personnel.password" theme="simple" required="true"></s:password>
						</td>
						<td align="left">
							
						</td>
					</tr>														
				</table>
				<br />
				<br />
				<table>
					<tr>
						<td>
							<input type="submit" value=" 增 加 "/>
						</td>
					</tr>
				</table>
			</s:form>
		</center>

	</body>
</html>